The invention generally relates to computer systems, and more particularly relates to display image rotation (transformation).
With the advances of semiconductor and computer technology, computer systems are becoming faster and at the same time smaller in size. The tasks performed by computer systems are also becoming increasingly more complex. This is particularly true in the area of computer graphics. Computer systems are now capable of generating complex and high-resolution 3 dimensional (3D) graphics objects with lifelike movements. These 3D graphics objects require a great deal of data transfer (e.g., retrieving the attributes data related to the object such as data block height, width, color, and texture from system memory) and processing (e.g., computing the color and texture values for the object""s pixels to accurately reflect the object""s shading at a position). For these reasons, improved performance (e.g., speed) is a never-ending quest in the area of computer graphics.
Generally, to render a graphics image in a computer system, computer graphics objects are first constructed with combinations of graphics primitives using a graphics application program. The graphics primitives are connected together to form a geometrical model of the desired graphics object or picture to be displayed on the monitor. The graphics model is a linked data structure that contains a detailed geometric description of the graphics object and its associated attributes (e.g., color, shading, texture, lighting, etc.) describing how the object should appear. Data related to the graphics model are stored in the computer system memory. On the other hand, data ready to be displayed on the monitor is stored as a pixmap in a frame buffer (i.e., a pixel pattern mapped into the frame buffer). In response to a user graphics command (e.g., a Raster Operation (ROP)), graphics data from the system memory and from the frame buffer are retrieved with the help of the Central Processor (CPU) and the Memory Interface Unit (MIU) and provided to the Graphics Engine (GE) for processing. The processed data is then provided with the help of the MIU to the frame buffer for subsequent display by the monitor. In displaying a graphics image, it may be desirable at times to transform the image from one orientation to another orientation. An image transformation generally involves accessing and manipulating the stored image data.
There are seven different display image transformations T1-T7 relative to a display image originally created. The display image as originally created is referred to as the normal (T0) transformation. Reference is now made to FIGS. 1A-1H illustrate these eight different display image transformations. FIG. 1A illustrates a display image as it is originally created without any transformation which is commonly referred to a normal transformation T0. FIG. 1B illustrates a horizontal-flip transformation T1 of the original display image. As its name suggests, a horizontal-flip transformation involves flipping the original display image about a vertical axis. FIG. 1C illustrates a vertical-flip transformation T2 of the original display image. As its name suggests, a vertical-flip transformation involves flipping the original display image about a horizontal axis. FIG. 1D illustrates a horizontal-vertical-flip transformation T3 of the original display image. As its name suggests, a horizontal-vertical-flip transformation involves flipping the original display image about a vertical axis and a horizontal axis (in any particular order) which is the equivalent of rotating the original image 180-degree counter-clockwise. FIG. 1E illustrates a swap XY transformation T4 of the original display image. In a swap XY transformation, pixel data of the original display image (normal transformation) along the X-coordinates are exchanged with pixel data along the Y-coordinates. In other words, the swap XY transformation involves flipping the original display image about a 45-degree axis. FIG. 1F illustrates a swap-xy-horizontal-flip transformation T5 of the original display image. As its name suggests, a swap-xy-horizontal-flip transformation involves swapping pixel data along the X-coordinates with pixel data along the Y-coordinates and flipping the swapped pixel data about a vertical axis. This transformation is equivalent to rotating the original image 270-degree counter-clockwise. FIG. 1G illustrates a swap-xy-vertical-flip transformation T6 of the original display image. As its name suggests, a swap-xy-vertical-flip transformation involves swapping pixel data along the X-coordinates with pixel data along the Y-coordinates and flipping the swapped pixel data about a horizontal axis. This transformation is equivalent to rotating the original image 90-degree counter-clockwise. Finally, FIG. 1H illustrates a swap-xy-horizontal-flip-and-vertical-flip transformation T6 of the original display image. As its name suggests, a swap-xy-horizontal-flip-and-vertical-flip transformation involves swapping pixel data along the X-coordinates with pixel data along the Y-coordinates and flipping the swapped pixel data about both a vertical axis and a horizontal axis.
To speed up the transformation process, display image transformations are preferably hardware based. Traditionally, display image transformations are performed in the front-end when the display image data is retrieved from system memory prior to being sent to the frame buffer. In this traditional approach, the transformations are carried out by the source circuitry (e.g., the CPU, the graphics engine, the video controller, etc.) that writes the image into the frame buffer. Because there may be more than one source, following this approach, each of these sources needs the capability to do display image transformations which may add an undesirable level of redundancy and complexity.
U.S. Pat. No. 4,554,638 titled xe2x80x9cDisplay Device Including Apparatus for Rotating the Image to be Displayedxe2x80x9d issued to Kazuhiko Iida (hereinafter the ""638 patent) teaches an implementation of the aforementioned traditional approach. Under the ""638 patent, the image data revolution circuit inside the display interface unit transforms display image data received from memory (page buffer) before sending the transformed image data to refresh memories (i.e., frame buffer) for output to the Cathode-Ray-Tube (CRT) display. The image data revolution circuit has a plurality of Random-Access-Memory (RAM) chips arranged in a matrix fashion corresponding to the X and Y coordinates of the display image such that individual memory cells in the RAM chips can be randomly accessed using row and column addresses. By storing the display image received in the RAM chips, information contained in any memory row or column can be accessed which allows display image transformations to be carried out. FIGS. 2A-2H illustrate the memory locations access sequences that correspond to the T0-T7 display image transformations discussed earlier. In other words, by accessing and outputting the stored display image data in a predetermined sequence (as illustrated in FIGS. 2A-2H), any one of the aforementioned transformations can be achieved. However, to allow individual memory cells in the memory matrix to be accessed individually and randomly, the ""638 patent requires the RAM chips to be fully connected in both X and Y directions as well as extra hardware to carry out the tasks associated with sequencing, address decoding, memory selecting, etc. This translates to added costs as well as increased size which is undesirable in today""s era of miniaturization.
On the other hand, U.S. Pat. No. 4,703,515 titled xe2x80x9cImage Rotationxe2x80x9d issued to Anthony Baroody, Jr. (hereinafter the ""515 patent) teaches a variation of the aforementioned traditional approach. Under the ""515 patent, the video controller initiates the transformation process when image data is read from system memory and before the image data is stored in the frame buffer. The frame buffer is designed so as to physically accommodate both a standard configuration and a folded configuration. In the standard configuration, image data is mapped into the frame buffer such that the scan lines of the image data run the length of the frame buffer to accommodate portrait mode printing. Conversely, in the folded configuration, image data is mapped into the frame buffer such that the scan lines of the image data run across the frame buffer (i.e., 90-degree to the length of the frame buffer) to accommodate landscape mode printing. Hence, data storage is physically different in the two aforementioned configurations. Additional image transformations, more specifically inverse portrait in which the original portrait image is rotated 180 degrees and inverse landscape in which the original landscape image is rotated 180 degrees, can be carried out by the output controller by accessing the stored image data in the frame buffer for output in a reverse direction from the way the image data is stored. Accordingly, in addition to requiring different stages for some image transformations which are somewhat cumbersome and complex, the implementation under the ""515 patent further requires a frame buffer that is physically configured to accommodate both a standard configuration and a folded configuration which may add undesired costs.
Thus, a need exists for an apparatus, system, and method for transforming display image that are conducive to miniaturization and inexpensive to implement.
Accordingly, the present invention provides an apparatus, system, and method for transforming display image that are conducive to miniaturization and inexpensive to implement.
The present invention meets the above need with a graphics controller which is coupled to system memory. The graphics controller comprises a frame buffer and combinational logic which is coupled to the frame buffer. The frame buffer consists of N memory modules for storing image data copied from the system memory, wherein each memory module is individually accessible. The image data stored in the frame buffer is arranged serially based on a line stride value such that corresponding pixels of N adjacent rows of the stored image data locate in N different memory modules. The combinational logic generates a starting address signal and control signals used in selectively accessing the stored imaged data in the frame buffer for output in a sequence such that the output image data is transformed.
All the features and advantages of the present invention will become apparent from the following detailed description of its preferred embodiment whose description should be taken in conjunction with the accompanying drawings.